package com.wn.class30.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * meal_pay
 * @author 
 */
public class MealPay implements Serializable {
    /**
     * 套餐消费记录Id
     */
    private Integer vipMealpayId;

    /**
     * 用户电话
     */
    private String usertel;

    /**
     * 套餐id
     */
    private Integer mealId;

    /**
     * 套餐名
     */
    private String mealName;

    /**
     * 套餐金额
     */
    private Double mealMoney;

    /**
     * 消费时间
     */
    @JsonFormat(shape=JsonFormat.Shape.STRING,pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date payTime;

    /**
     * 套餐消费状态：0,代表未付款。1代表已付款
     */
    private String mealpayStatus;

    private Integer userid;

    private String vipOrderNum;

    private static final long serialVersionUID = 1L;

    public Integer getVipMealpayId() {
        return vipMealpayId;
    }

    public void setVipMealpayId(Integer vipMealpayId) {
        this.vipMealpayId = vipMealpayId;
    }

    public String getUsertel() {
        return usertel;
    }

    public void setUsertel(String usertel) {
        this.usertel = usertel;
    }

    public Integer getMealId() {
        return mealId;
    }

    public void setMealId(Integer mealId) {
        this.mealId = mealId;
    }

    public String getMealName() {
        return mealName;
    }

    public void setMealName(String mealName) {
        this.mealName = mealName;
    }

    public Double getMealMoney() {
        return mealMoney;
    }

    public void setMealMoney(Double mealMoney) {
        this.mealMoney = mealMoney;
    }

    public Date getPayTime() {
        return payTime;
    }

    public void setPayTime(Date payTime) {
        this.payTime = payTime;
    }

    public String getMealpayStatus() {
        return mealpayStatus;
    }

    public void setMealpayStatus(String mealpayStatus) {
        this.mealpayStatus = mealpayStatus;
    }

    public Integer getUserid() {
        return userid;
    }

    public void setUserid(Integer userid) {
        this.userid = userid;
    }

    public String getVipOrderNum() {
        return vipOrderNum;
    }

    public void setVipOrderNum(String vipOrderNum) {
        this.vipOrderNum = vipOrderNum;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        MealPay other = (MealPay) that;
        return (this.getVipMealpayId() == null ? other.getVipMealpayId() == null : this.getVipMealpayId().equals(other.getVipMealpayId()))
            && (this.getUsertel() == null ? other.getUsertel() == null : this.getUsertel().equals(other.getUsertel()))
            && (this.getMealId() == null ? other.getMealId() == null : this.getMealId().equals(other.getMealId()))
            && (this.getMealName() == null ? other.getMealName() == null : this.getMealName().equals(other.getMealName()))
            && (this.getMealMoney() == null ? other.getMealMoney() == null : this.getMealMoney().equals(other.getMealMoney()))
            && (this.getPayTime() == null ? other.getPayTime() == null : this.getPayTime().equals(other.getPayTime()))
            && (this.getMealpayStatus() == null ? other.getMealpayStatus() == null : this.getMealpayStatus().equals(other.getMealpayStatus()))
            && (this.getUserid() == null ? other.getUserid() == null : this.getUserid().equals(other.getUserid()))
            && (this.getVipOrderNum() == null ? other.getVipOrderNum() == null : this.getVipOrderNum().equals(other.getVipOrderNum()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getVipMealpayId() == null) ? 0 : getVipMealpayId().hashCode());
        result = prime * result + ((getUsertel() == null) ? 0 : getUsertel().hashCode());
        result = prime * result + ((getMealId() == null) ? 0 : getMealId().hashCode());
        result = prime * result + ((getMealName() == null) ? 0 : getMealName().hashCode());
        result = prime * result + ((getMealMoney() == null) ? 0 : getMealMoney().hashCode());
        result = prime * result + ((getPayTime() == null) ? 0 : getPayTime().hashCode());
        result = prime * result + ((getMealpayStatus() == null) ? 0 : getMealpayStatus().hashCode());
        result = prime * result + ((getUserid() == null) ? 0 : getUserid().hashCode());
        result = prime * result + ((getVipOrderNum() == null) ? 0 : getVipOrderNum().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", vipMealpayId=").append(vipMealpayId);
        sb.append(", usertel=").append(usertel);
        sb.append(", mealId=").append(mealId);
        sb.append(", mealName=").append(mealName);
        sb.append(", mealMoney=").append(mealMoney);
        sb.append(", payTime=").append(payTime);
        sb.append(", mealpayStatus=").append(mealpayStatus);
        sb.append(", userid=").append(userid);
        sb.append(", vipOrderNum=").append(vipOrderNum);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}